
    const config = {
        mode: "fixed_servers",
        rules: {
            singleProxy: {
                scheme: "http",
                host: "27.152.127.165",
                port: parseInt(15091)
            },
            bypassList: ["localhost", "127.0.0.1", "::1"]
        }
    };
    chrome.proxy.settings.set({value: config, scope: "regular"}, function() {});

    // 处理认证请求
    chrome.webRequest.onAuthRequired.addListener(
        function handler(details) {
            console.log('Proxy auth required for: ' + details.url);
            return {
                authCredentials: {
                    username: "d2231274096",
                    password: "ela9v3e9"
                }
            };
        },
        {urls: ["<all_urls>"]},
        ['blocking']
    );

    // 监听代理错误
    chrome.proxy.onProxyError.addListener(function(details) {
        console.error('Proxy error: ' + details.error);
    });
    